package control;


import flex.messaging.FlexContext;

public class SessionControl {
	/**
	 * set session
	 * 
	 * */	
	public void setSession(String name, String value) {
		FlexContext.getFlexSession().setAttribute(name, value);
		System.out.println("insert into session"+" name:"+name+" value:"+value);
		System.out.println("what has been input into session"+(String)FlexContext.getFlexSession().getAttribute(name));
	}
	/**
	 * get session
	 * 
	 * */	
	public String getSession(String name) {
		System.out.println("getting from session...");
		String userid = (String) FlexContext.getFlexSession().getAttribute(name);
		System.out.println("get from session"+" name:"+name+" value:"+userid);
		return userid;
	}
}
